//============================================================
//
//
//! \file resource.h
//! A base class for all resources.
//
//
//============================================================
#ifndef _CORE_RESOURCE__H_
#define _CORE_RESOURCE__H_
#include "boost/shared_ptr.hpp"
#include "boost/weak_ptr.hpp"

namespace core
{

    class Resource;
    typedef boost::shared_ptr<Resource>     ResourcePtr;
    typedef boost::weak_ptr<Resource>       ResourceWeakPtr;



    //=====================
    // Resource
    //! The base class for all resources.\n
    //! If a class does not inherit from this class it will not be\n
    //! compatible with the resource manager.
    //=====================
    class Resource
    {
        public:
            Resource() {}
            virtual ~Resource() {}

            //! Returns the name of the resource. This is purly for\n
            //! more informative loggin and should not be used as a identifier\n
            //! for the resource.
            std::string GetResourceName() const { return( m_ResourceName ); }
            void        SetResourceName( const std::string& p_Name ) { m_ResourceName = p_Name; }

        protected:
            std::string m_ResourceName;
    };

};



#endif // #ifndef _CORE_RESOURCE__H_
